package domain

import "apitestAfterGo/dto"

type SystemInfo struct {
	Id           int    `json:"id"`
	SystemId     int    `json:"system_id"`
	InfoName     string `json:"info_name"`
	Address      string `json:"address"`
	DatabaseUrl  string `json:"database_url"`
	Type         string `json:"type"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	DatabaseName string `json:"database_name"`
	Charset      string `json:"charset"`
	Autocommit   int    `json:"autocommit"`
	IsDelete     int    `json:"isDelete"`
}

type SyetemInfoMapper struct {
	DeleteTemplate       func(id int) (int64, error)      `args:"id"`
	GetSystemInfoById    func(id int) (SystemInfo, error) `args:"id"`
	GetAllSystemCount    func(dto dto.SystemInfoPageDto) (int, error)
	GetSystemInfosByPage func(dto dto.SystemInfoPageDto) ([]SystemInfo, error)
	AddSystemInfo        func(info SystemInfo) (int, error)
	ModifySystemInfoById func(info SystemInfo) (int, error)
	GetSystemsBySystemId func(id int) ([]SystemInfo, error) `args:"id"`
}
